﻿ (function ($) {
        $.validator.unobtrusive.adapters.addBool("booleanrequired", "required");
    } (jQuery));

     var hdnReplaceTextString = $("#hdnReplace").val();
    $(function () {
       
          //TopBar 
        $("#link_Agreement").addClass("current");
        $("#link_Signup, #link_Availability, #link_Extras, #link_Configuration, #link_OrderSummary").addClass("completed");
        
        $(".Topstate li").each(function (index) {
        if($(this).hasClass('completed'))
        {
        var strhref=$(this).attr('id').split('_')[1];
        var strshowtext=$(this).text();
        var makehref = hdnReplaceTextString;
        var afterreplace= makehref.replace("ReplaceText",strhref);
        $(this).html("<a href="+afterreplace+">"+strshowtext+"</a>");
        }
        });

        $("#Agreementcheck").attr('checked','checked');
        
    });

     $("#btnback").live("click", function (e) {
         $("#loaderCenter").show();
         $('#screen').css({ 'display': 'block', opacity: 0.3, 'width': $(document).width(), 'height': $(document).height() });
          });
          
           $("#btnnext").live("click", function (e) {
           
             if ($("#Agreementcheck").is(':checked'))
             {
                 $("#loaderCenter").show();
                 $('#screen').css({ 'display': 'block', opacity: 0.3, 'width': $(document).width(), 'height': $(document).height() });
              }
          });
